
import { t } from '@src/locales'

function createTemplate(icon = '', title = '', second = '', deputy = '', toolTip = '') {
	return { title, second, deputy, toolTip, icon }
}

export const iconsMap = {
	custom: 'iconfont icon-caidan_kehumokuai bg-success',
	event: 'iconfont icon-caidan_fuwutai bg-blue',
	order: 'iconfont icon-shopping-fill	bg-orange',
	callCenter: 'iconfont icon-phone-fill bg-orange',
	task: 'iconfont icon-caidan_gongdanmokuai bg-primary',
	sparePart: 'iconfont icon-caidan_beijianguanli bg-yellow',
	changingOrRefunding: 'iconfont icon-tuihuanhuo1 bg-yellow',
}

export const indicatorTempMap = {
	// 事件总服务客户
	eventAllCustomer: createTemplate(iconsMap.event, t('personal.modal.statistics.indicatorMap.eventAllCustomer[0]')),
	// 事件今日服务客户
	eventCustomerToday: createTemplate(iconsMap.event, t('personal.modal.statistics.indicatorMap.eventCustomerToday[0]'), t('personal.modal.statistics.indicatorMap.eventCustomerToday[1]'), t('personal.modal.statistics.indicatorMap.eventCustomerToday[2]')),
	// 事件本月服务客户
	eventCustomerCurrentMonth: createTemplate(iconsMap.event, t('personal.modal.statistics.indicatorMap.eventCustomerCurrentMonth[0]'), t('personal.modal.statistics.indicatorMap.eventCustomerCurrentMonth[1]'), t('personal.modal.statistics.indicatorMap.eventCustomerCurrentMonth[2]')),
	// 事件近30天好评率
	eventFavorableRateLast30Days: createTemplate(iconsMap.event, t('personal.modal.statistics.indicatorMap.eventFavorableRateLast30Days[0]'), t('personal.modal.statistics.indicatorMap.eventFavorableRateLast30Days[1]')),
	// 未完成事件
	eventUnfinished: createTemplate(iconsMap.event, t('personal.modal.statistics.indicatorMap.eventUnfinished[0]'), t('personal.modal.statistics.indicatorMap.eventUnfinished[1]')),
	// 今日完成事件
	eventFinishedToday: createTemplate(iconsMap.event, t('personal.modal.statistics.indicatorMap.eventFinishedToday[0]'), t('personal.modal.statistics.indicatorMap.eventFinishedToday[1]'), t('personal.modal.statistics.indicatorMap.eventFinishedToday[2]')),
	// 总订单
	orderTotalCount: createTemplate(iconsMap.order, t('personal.modal.statistics.indicatorMap.orderTotalCount[0]'), t('personal.modal.statistics.indicatorMap.orderTotalCount[1]')),
	// 今日完成订单
	orderFinishedToday: createTemplate(iconsMap.order, t('personal.modal.statistics.indicatorMap.orderFinishedToday[0]'), t('personal.modal.statistics.indicatorMap.orderFinishedToday[1]'), t('personal.modal.statistics.indicatorMap.orderFinishedToday[2]')),
	// 本月完成订单
	orderFinishedCurrentMonth: createTemplate(iconsMap.order, t('personal.modal.statistics.indicatorMap.orderFinishedCurrentMonth[0]'), t('personal.modal.statistics.indicatorMap.orderFinishedCurrentMonth[1]'), t('personal.modal.statistics.indicatorMap.orderFinishedCurrentMonth[2]')),
	// 本月订单营收
	orderIncomeCurrentMonth: createTemplate(iconsMap.order, t('personal.modal.statistics.indicatorMap.orderIncomeCurrentMonth[0]'), t('personal.modal.statistics.indicatorMap.orderIncomeCurrentMonth[1]'), t('personal.modal.statistics.indicatorMap.orderIncomeCurrentMonth[2]')),
	// 今日呼入
	calledInToday: createTemplate(iconsMap.callCenter, t('personal.modal.statistics.indicatorMap.calledInToday[0]'), t('personal.modal.statistics.indicatorMap.calledInToday[1]')),
	// 今日呼出
	calledOutToday: createTemplate(iconsMap.callCenter, t('personal.modal.statistics.indicatorMap.calledOutToday[0]'), t('personal.modal.statistics.indicatorMap.calledOutToday[1]')),
	// 工单总服务客户
	taskAllCustomer: createTemplate(iconsMap.task, t('personal.modal.statistics.indicatorMap.taskAllCustomer[0]')),
	// 工单今日服务客户
	taskCustomerToday: createTemplate(iconsMap.task, t('personal.modal.statistics.indicatorMap.taskCustomerToday[0]'), t('personal.modal.statistics.indicatorMap.taskCustomerToday[1]'), t('personal.modal.statistics.indicatorMap.taskCustomerToday[2]')),
	// 工单本月服务客户
	taskCustomerCurrentMonth: createTemplate(iconsMap.task, t('personal.modal.statistics.indicatorMap.taskCustomerCurrentMonth[0]'), t('personal.modal.statistics.indicatorMap.taskCustomerCurrentMonth[1]'), t('personal.modal.statistics.indicatorMap.taskCustomerCurrentMonth[2]')),
	// 工单近30天好评率
	taskFavorableRateLast30Days: createTemplate(iconsMap.task, t('personal.modal.statistics.indicatorMap.taskFavorableRateLast30Days[0]'), t('personal.modal.statistics.indicatorMap.taskFavorableRateLast30Days[1]')),
	// 未完成工单
	taskUnfinished: createTemplate(iconsMap.task, t('personal.modal.statistics.indicatorMap.taskUnfinished[0]'), t('personal.modal.statistics.indicatorMap.taskUnfinished[1]')),
	// 异常工单
	taskException: createTemplate(iconsMap.task, t('personal.modal.statistics.indicatorMap.taskException[0]')),
	// 今日完成工单
	taskFinishedToday: createTemplate(iconsMap.task, t('personal.modal.statistics.indicatorMap.taskFinishedToday[0]'), t('personal.modal.statistics.indicatorMap.taskFinishedToday[1]'), t('personal.modal.statistics.indicatorMap.taskFinishedToday[2]')),
	// 本月完成工单
	taskFinishedCurrentMonth: createTemplate(iconsMap.task, t('personal.modal.statistics.indicatorMap.taskFinishedCurrentMonth[0]'), t('personal.modal.statistics.indicatorMap.taskFinishedCurrentMonth[1]'), t('personal.modal.statistics.indicatorMap.taskFinishedCurrentMonth[2]')),
	// 今日工单营收
	taskIncomeToday: createTemplate(iconsMap.task, t('personal.modal.statistics.indicatorMap.taskIncomeToday[0]'), t('personal.modal.statistics.indicatorMap.taskIncomeToday[1]'), t('personal.modal.statistics.indicatorMap.taskIncomeToday[2]')),
	// 本月工单营收
	taskIncomeCurrentMonth: createTemplate(iconsMap.task, t('personal.modal.statistics.indicatorMap.taskIncomeCurrentMonth[0]'), t('personal.modal.statistics.indicatorMap.taskIncomeCurrentMonth[1]'), t('personal.modal.statistics.indicatorMap.taskIncomeCurrentMonth[2]')),
	// 近30天已结算工单
	taskSettledLast30Days: createTemplate(iconsMap.task, t('personal.modal.statistics.indicatorMap.taskSettledLast30Days[0]'), t('personal.modal.statistics.indicatorMap.taskSettledLast30Days[1]')),
	// 今日已回访工单
	taskReviewToday: createTemplate(iconsMap.task, t('personal.modal.statistics.indicatorMap.taskReviewToday[0]'), t('personal.modal.statistics.indicatorMap.taskReviewToday[1]')),
	// 近30天完工榜
	taskFinishedRankLast30Days: createTemplate(iconsMap.task, t('personal.modal.statistics.indicatorMap.taskFinishedRankLast30Days[0]'), t('personal.modal.statistics.indicatorMap.taskFinishedRankLast30Days[1]')),
	// 近30天营收榜
	taskIncomeRankLast30Days: createTemplate(iconsMap.task, t('personal.modal.statistics.indicatorMap.taskIncomeRankLast30Days[0]')),
	// 上月完成工单
	taskFinishedLastMonth: createTemplate(iconsMap.task, t('personal.modal.statistics.indicatorMap.taskFinishedLastMonth[0]')),
	// 上月工单营收
	taskIncomeLastMonth: createTemplate(iconsMap.task, t('personal.modal.statistics.indicatorMap.taskIncomeLastMonth[0]')),
	// 今日已办理出库单
	sparepartTodayFinished: createTemplate(iconsMap.sparePart, t('personal.modal.statistics.indicatorMap.sparepartTodayFinished[0]')),
	// 库存提醒
	sparepartInventorRemind: createTemplate(iconsMap.sparePart, t('personal.modal.statistics.indicatorMap.sparepartInventorRemind[0]')),
	// 今日完成退换货
	goodsRefoundToday: createTemplate(iconsMap.changingOrRefunding, t('personal.modal.statistics.indicatorMap.goodsRefoundToday[0]'), t('personal.modal.statistics.indicatorMap.goodsRefoundToday[1]'), t('personal.modal.statistics.indicatorMap.goodsRefoundToday[2]')),
}
